package fr.pascal.client.ui.selection;

import com.google.gwt.activity.shared.Activity;
import com.google.gwt.activity.shared.ActivityMapper;
import com.google.gwt.place.shared.Place;

import fr.pascal.client.ClientFactory;
import fr.pascal.client.mvp.MainPlace;

public class SelectionRubriquesActivityMapper implements ActivityMapper {

	private ClientFactory clientFactory;

	public SelectionRubriquesActivityMapper(ClientFactory clientFactory) {
		this.clientFactory = clientFactory;
	}

	@Override
	public Activity getActivity(Place place) {
		if (place instanceof MainPlace) {
			return new SelectionRubriquesActivity((MainPlace) place, clientFactory);
		}
		return null;
	}
}
